import BTComposite from "../../Base/BTComposite";
import BTTree from "../../Base/BTTree";
import ActionAttack from "../Action/ActionAttack";
import ActionFailure from "../Action/ActionFailure";
import ActionLog from "../Action/ActionLog";
import ActionSkill from "../Action/ActionSkill";
import ActionSleep from "../Action/ActionSleep";
import ActionWait from "../Action/ActionWait";
import ActionWork from "../Action/ActionWork";
import CompositeRandomSequence from "../Composite/compositeRandomSequence";
import CompositeSelector from "../Composite/compositeSelector";
import CompositeSequence from "../Composite/CompositeSequence";
import ConditionalHP from "../Conditional/ConditionalHP";
import ConditionalMP from "../Conditional/ConditionalMP";
import DecoratorInverter from "../Decoraor/DecortorInverter";

export default class MyTree extends BTTree {
    constructor() {
        super();
        this.init();

    }

    init() {
        this.root = new CompositeSequence([
            new CompositeSelector([
                new CompositeSequence([
                    new ConditionalMP(),
                    new CompositeSequence([
                        new ActionWait(),
                        new ActionSkill(),
                    ]),
                ]),
                new CompositeSequence([
                    new ConditionalHP(),
                    new ActionAttack()
                ]),
                new CompositeRandomSequence([
                    new ActionWork(),
                    new ActionSleep(),
                ]),
            ]),
        ]);
    }
}
